﻿//Mr.PuginTemplate - Created by CodenameGamma - 4-12-11 - For WoW Version 4.0.3+
//www.honorbuddy.de
//this is a free plugin, and should not be sold, or repackaged.
//Donations Accepted. 
//Version 1.0


using System.Drawing;
using System.Linq;
using System.Windows.Forms;

namespace MrPluginTemplate
{
    using Styx.Logic;
    using System;
    using Styx.Helpers;
    using Styx.Logic.Pathing;
    using System.Threading;
    using System.Diagnostics;
    using Styx.WoWInternals;
    using Styx.WoWInternals.WoWObjects;
    using System.Collections.Generic;
    using System.Linq;
    using System.Linq.Expressions;
    using System.IO;
    using System.Runtime.InteropServices;
    using System.Xml.Linq;
    using System.Net;
    using Styx.Plugins.PluginClass;
    using Styx;

    public class MrPluginTemplate : HBPlugin
    {
        //Normal Stuff.
        public override string Name { get { return "Orphan Caster"; } }
        public override string Author { get { return "MadDog"; } }
        public override Version Version { get { return new Version(1, 3); } }
        public override bool WantButton { get { return true; } }
        public override string ButtonText { get { return "Orphan Caster"; } }

        //Logging Class for your conviance
        public static void slog(string format, params object[] args)
        { Logging.Write(Color.Red, "Orphan Caster:" + format, args); }
        private static readonly LocalPlayer Me = ObjectManager.Me;


        //Uncomment if adding a UI for the plugin
        /*public override void OnButtonPress()
        {

        }*/

        public override void Pulse()
        {
            WoWUnit MyPet = Me.VanityPet;
            if (Me.IsAlliance)
            {
                if (MyPet == null || MyPet.Entry != 14305)
                {
                    Lua.DoString("RunMacroText('/use Human Orphan Whistle');");
                    Logging.Write(Color.Crimson, "Human Orphan Whistle Casted");
                }
            }
            else if (Me.IsHorde)
            {
                if (MyPet == null || MyPet.Entry != 14444)
                {
                    Lua.DoString("RunMacroText('/use Orcish Orphan Whistle');");
                    Logging.Write(Color.Crimson, "Orcish Orphan Whistle Casted");
                }
            }
        }
        




    }
}

